<!DOCTYPE html>
<html class="x-admin-sm">

<head>
  <meta charset="UTF-8">
  <title></title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
    content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
  <link rel="stylesheet" href="./lib/layui-v.2.8/css/layui.css">
  <link rel="stylesheet" href="./css/font.css">
  <link rel="stylesheet" href="./css/xadmin.css">
  <link rel="stylesheet" href="./lib/cropper/cropper.css">
  <link rel="stylesheet" href="./css/link.css">
  <script src="./lib/layui-v.2.8/layui.js" charset="utf-8"></script>
  <script src="./js/jquery.min.js"></script>
  <script src="./lib/axios.min.js"></script>
  <script type="text/javascript" src="./js/xadmin.js"></script>
  <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
</head>

<body>
  <div class="x-nav">
    <span class="layui-breadcrumb">
      <a href="">首页</a>
      <a href="">演示</a>
      <a>
        <cite>导航元素</cite></a>
    </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
      onclick="location.reload()" title="刷新">
      <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
  </div>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-card" style="padding: 16px;">

        <!-- 备用： 添加弹出层的表单内容结构 -->
        <form id="addForm" class="layui-form" style="display: none;">
          <!-- 第一行 链接类型 -->
          <div class="layui-form-item" style="margin-top: 15px;">
            <label class="layui-form-label"><strong>*</strong>链接类型</label>
            <div class="layui-col-md4">
              <select lay-filter="valType" name="type">
                <option value="">请选择</option>
                <option value="1">文字类型</option>
                <option value="2">图片类型</option>
              </select>
            </div>
          </div>
          <!-- 第二行 标题名称  -->
          <div class="layui-form-item" style="display:none;" id="titleTxt">
            <div class="layui-col-md11">
              <label class="layui-form-label"><strong>*</strong>标题</label>
              <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" placeholder="请输入标题名称" autocomplete="off"
                  class="layui-input">
              </div>
            </div>
          </div>
          <!-- 第三行 链接地址  -->
          <div class="layui-form-item">
            <div class="layui-col-md11">
              <label class="layui-form-label"><strong>*</strong>链接地址</label>
              <div class="layui-input-block">
                <input type="text" name="url" lay-verify="required" placeholder="请输入链接地址" autocomplete="off"
                  class="layui-input">
              </div>
            </div>
          </div>
          <!-- 第四行 链接描述 -->
          <div class="layui-form-item layui-form-text">
            <div class="layui-col-md11">
              <label class="layui-form-label"><strong>*</strong>链接描述</label>
              <div class="layui-input-block">
                <textarea placeholder="请输入链接描述名称" name="des" class="layui-textarea"></textarea>
              </div>
            </div>
          </div>
          <!-- 第五行 链接图片 -->
          <div class="layui-form-item" style="display: none;" id="titleImg">

            <label class="layui-form-label"><strong>*</strong>链接图片</label>
            <div class="layui-input-block cropper-container">
              <!-- 文件选择框 -->
              <input class="layui-hide" name="img" type="img" id="fileCover"
                accept="image/jpeg,image/png,image/gif,image/bmp" />
              <div class="container">
                <img src="">
              </div>
              <div class="right-box">
                <div class="preview"></div>
                <button type="button" class="layui-btn layui-btn-danger" id="btnChooseCoverImage">选择封面</button>
              </div>
            </div>

          </div>
          <!-- 第六行 按钮 -->
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="formDemo">确认添加</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>
        </form>

        <!-- 备用：编辑弹出层的表单内容结构 -->
        <form id="editForm" class="layui-form" style="display: none;">
          <!-- 第一行 链接类型 -->
          <div class="layui-form-item" style="margin-top: 15px;">
            <label class="layui-form-label"><strong>*</strong>链接类型</label>
            <div class="layui-col-md4">
              <select lay-filter="valType" name="type">
                <option value="1">文字类型</option>
                <option value="2">图片类型</option>
              </select>
            </div>
          </div>
          <!-- 第二行 标题名称  -->
          <div class="layui-form-item" style="display:none;" id="editTxt">
            <div class="layui-col-md11">
              <label class="layui-form-label"><strong>*</strong>标题</label>
              <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" placeholder="请输入标题名称" autocomplete="off"
                  class="layui-input">
              </div>
            </div>
          </div>
          <!-- 第三行 链接地址  -->
          <div class="layui-form-item">
            <div class="layui-col-md11">
              <label class="layui-form-label"><strong>*</strong>链接地址</label>
              <div class="layui-input-block">
                <input type="text" name="url" lay-verify="required" placeholder="请输入链接地址" autocomplete="off"
                  class="layui-input">
              </div>
            </div>
          </div>
          <!-- 第四行 链接描述 -->
          <div class="layui-form-item layui-form-text">
            <div class="layui-col-md11">
              <label class="layui-form-label"><strong>*</strong>链接描述</label>
              <div class="layui-input-block">
                <textarea placeholder="请输入链接描述名称" name="des" class="layui-textarea"></textarea>
              </div>
            </div>
          </div>
          <!-- 第五行 链接图片 -->
          <div class="layui-form-item" style="display: none;" id="editImg">

            <label class="layui-form-label"><strong>*</strong>链接图片</label>
            <div class="layui-input-block cropper-container">
              <!-- 文件选择框 -->
              <input name="img" type="img" id="fileCover"
                accept="image/jpeg,image/png,image/gif,image/bmp" />
              <div class="container">
                <img src="">
              </div>
              <div class="right-box">
                <div class="preview"></div>
                <button type="button" class="layui-btn layui-btn-danger" id="btnChooseCoverImage">选择封面</button>
              </div>
            </div>

          </div>
          <!-- 第六行 按钮 -->
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="formDemo">确认添加</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>
        </form>

        <!-- 切换栏 -->
        <div class="layui-tab layui-tab-brief">
          <button type="button" class="layui-btn layui-btn-primary layui-border-blue" id="btnAddCate">
            <i class="layui-icon layui-icon-addition zx_white"></i>
            <span class="zx_white">新增</span>
          </button>
          <ul class="layui-tab-title">
            <li class="layui-this">文字链接</li>
            <li>图片链接</li>
          </ul>
          <div class="layui-tab-content">

            <!-- 文字链接模块 -->
            <div class="layui-tab-item layui-show">
              <table class="layui-table" style="text-align: center;">
                <colgroup>
                  <col width="0">
                  <col width="300">
                  <col width="300">
                  <col width="300">
                  <col width="300">
                  <col width="300">
                  <col>
                </colgroup>
                <thead class="zx_thead">
                  <tr>
                    <th>#</th>
                    <th>标题</th>
                    <th>链接描述</th>
                    <th>链接类型</th>
                    <th>链接地址</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody id="tbody_text">
                  <tr>
                    <td>1</td>
                    <td>wwww</td>
                    <td>wwwwww</td>
                    <td><span class="zx_title_text">文字类型</span></td>
                    <td>wwwww</td>
                    <td>
                      <button type="button" class="layui-btn layui-btn-normal btn_edit zx_circle1"><i
                          class="layui-icon layui-icon-edit zx_pen" style="font-size: 18px;"></i></button>
                      <button type="button" class="layui-btn layui-btn-xs layui-btn-danger btn_delete zx_circle1"><i
                          class="layui-icon layui-icon-delete zx_bin"></i></button>
                    </td>
                  </tr>
                </tbody>
              </table>
              <!-- 分页模块 -->
              <div id="page-box1"></div>

            </div>

            <!-- 图片链接模块 -->
            <div class="layui-tab-item">
              <table class="layui-table" style="text-align: center;">
                <colgroup>
                  <col width="0">
                  <col width="300">
                  <col width="300">
                  <col width="300">
                  <col width="300">
                  <col width="300">
                  <col>
                </colgroup>
                <thead class="zx_thead">
                  <tr>
                    <th>#</th>
                    <th>链接描述</th>
                    <th>链接图片</th>
                    <th>链接类型</th>
                    <th>链接地址</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody id="tbody_img">
                  <tr>
                    <td>1</td>
                    <td>wwww</td>
                    <td><img src="" alt=""></td>
                    <td><span class="zx_title_img">图片类型</span></td>
                    <td>wwwww</td>
                    <td>
                      <button type="button" class="layui-btn layui-btn-normal btn_edit zx_circle1"><i
                          class="layui-icon layui-icon-edit zx_pen" style="font-size: 18px;"></i></button>
                      <button type="button" class="layui-btn layui-btn-xs layui-btn-danger btn_delete zx_circle1"><i
                          class="layui-icon layui-icon-delete zx_bin"></i></button>
                    </td>
                  </tr>
                </tbody>
              </table>
              <!-- 分页模块 -->
              <div id="page-box2"></div>
            </div>
          </div>
        </div>

      </div>
    </div>
    <script src="./lib/cropper/Cropper.js"></script>
    <script src="./lib/cropper/jquery-cropper.js"></script>
    <script src="./js/common.js"></script>
    <script src="./js/link.js"></script>
</body>
<script>
</script>

</html>